<?php
	$TEMP->set_file(array('handle' => DIR_VIEW_DEAN . 'facultyAssignCourse.html'));
	$FID 	= _GET('fid');
	
	if (!empty($FID)) {
		$faculty = $PI->getPersonalInformation($FID);
		$profName = $faculty['first_name'] . ' ' . $faculty['last_name'];
	}
	
	$listCourses = $DSC->getListCourses($strAccDept);
	if ( !empty($listCourses) ) {
		
		$TEMP->set_block('handle',  'courses', 'coursesRow');
		$bgcolor 	= LOOPING_F0F;
		$numCount 	= 1;
			
		foreach($listCourses as $listCoursesField => $listCoursesValue) {
			
			$TEMP->set_var(array('course_id' 	=> $listCoursesValue['course_idPK'],
								 'course' 		=> $listCoursesValue['course_desc'],
								 'course_major'	=> (!empty($listCoursesValue['course_major'])) ? $listCoursesValue['course_major'] : '',
								 'course_code'	=> $listCoursesValue['course_code'],
								 'subject'		=> '<a href="?page=FacultyAssignSubject&fid=' . $FID . '&cid=' . $listCoursesValue['course_idPK'] . '"><img src="' . DIR_IMAGES . 'icon/arrow_down.png" border="0" title="Assign Subjects"/></a>',
								 'numbering'	=> $numCount,
								 'ed_button'	=> $edButton
								));
								
			$TEMP->parse('coursesRow', 'courses', true);
			$bgcolor = ($bgcolor == LOOPING_F0F) ? LOOPING_FFF : LOOPING_F0F;
			$numCount++;
		}
	}
	
	
	$TEMP->set_var(array('dean_sub_menu'	=> $pageLib->deanSubMenu(DIR_IMAGES),
						 'prof_name' 		=> $profName,
						));
?>